package model.components.nodes.node;

public class VirtualServer extends VirtualNode
{	
	public static final String NAME_PREFIX = "VirtualServer";
	
	public static final String GREY_SERVER = "/icons/greyVirtualServer.png";
	public static final String GREEN_SERVER = "/icons/greenVirtualServer.png"; 
	public static final String YELLOW_SERVER = "/icons/yellowVirtualServer.png"; 
	public static final String RED_SERVER = "/icons/redVirtualServer.png";
	
	private int diskSpaceUnitTimeUnitPrice;
	public int getDiskSpaceUnitTimeUnitPrice(){ return diskSpaceUnitTimeUnitPrice; }
	public void setDiskSpaceUnitTimeUnitPrice( int diskSpaceUnitTimeUnitPrice ){ this.diskSpaceUnitTimeUnitPrice = diskSpaceUnitTimeUnitPrice; }
	
	@Override
	public int getDiskSpace(){ return diskSpace; }
	@Override
	public void setDiskSpace( int diskSpace ){ this.diskSpace = diskSpace; }
	
	public VirtualServer( String networkName, int startingDate, int endingDate, int number, String operatingSystem, String virtualEnvironment, int cpu, int memory, int diskSpace )
	{
		super( networkName, startingDate, endingDate, VirtualServer.NAME_PREFIX, number, Node.SERVER_TYPE, operatingSystem, virtualEnvironment, cpu, memory, VirtualServer.GREY_SERVER, VirtualServer.GREEN_SERVER, VirtualServer.YELLOW_SERVER, VirtualServer.RED_SERVER );
		
		this.setDiskSpace( diskSpace );
	}
	
	@Override
	public VirtualServer getCopy()
	{
		VirtualServer virtualServer = new VirtualServer( this.getNetworkName(), this.getStartingDate(), this.getEndingDate(), this.getNumber(), this.getOperatingSystem(), this.getVirtualEnvironment(), this.getCpu(), this.getMemory(), this.getDiskSpace() );
		virtualServer.setInitialNumber( this.getInitialNumber() );
		virtualServer.setNamePrefix( this.getNamePrefix() );
		virtualServer.setType( this.getType() );
		virtualServer.setTimeStamp( this.getTimeStamp() );
		virtualServer.setSelected( this.isSelected() );
		virtualServer.setPhysicalNode( this.getPhysicalNode() );
		virtualServer.setCpuUnitTimeUnitPrice( this.getCpuUnitTimeUnitPrice() );
		virtualServer.setMemoryUnitTimeUnitPrice( this.getMemoryUnitTimeUnitPrice() );
		virtualServer.setDiskSpaceUnitTimeUnitPrice( this.getDiskSpaceUnitTimeUnitPrice() );
		
		return virtualServer;
	}

}
